package demo.standard;

public class ConcreteHandler1 implements IHandler {
    private IHandler next;

    @Override
    public void exec(Request request) {
        System.out.println("处理ConcreteHandler1");
        if (next != null) {
            next.exec(request);
        }
    }

    @Override
    public void setNext(IHandler handler) {
        this.next = handler;
    }
}
